package com.ff.neuropp.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ff.neuropp.util.DateSerializer;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@Entity
@Table(name = "t_evaluation", uniqueConstraints = {@UniqueConstraint(columnNames="id")})
/**
 * 评价表
 * @author sun_weiwu
 *
 */
public class Evaluation {
	 private static final long serialVersionUID = 1L;
	 
	   @Id
	    @GeneratedValue(strategy = GenerationType.IDENTITY)
	    private int id;
	 
	    @Column(name = " evaluation_content ", columnDefinition = "varchar(2000) COMMENT '评价内容'")
	    @ApiModelProperty(value = "评价内容")
	    private String evaluationContent;


	    @Column(name = "evaluation_time", columnDefinition = "datetime COMMENT '评价时间'")
	    private Date evaluationTime;
	    
	    
	    @Column(name = "evulater_id", columnDefinition = "varchar(100) COMMENT '评价人'")
	    @ApiModelProperty(value = "评价人 ")
	    private String evulaterId; 
	    
	    @Column(name = "evulater_name", columnDefinition = "varchar(100) COMMENT '评价人名称'")
	    @ApiModelProperty(value = "评价人名称 ")
	    private String evulaterName ;
	    
	    
	    @Column(name = "userId", columnDefinition = "varchar(100) COMMENT '被评价人'")
	    @ApiModelProperty(value = "被评价人 ")
	    private String userId ; 
	    
	    
	    @Column(name = "course_id", columnDefinition = "varchar(100) COMMENT '课程Id'")
	    @ApiModelProperty(value = "课程Id")
	    private String courseId ; 

	    //操作时间
	    @Column(updatable = false)
	    @org.hibernate.annotations.CreationTimestamp
	    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	    @JsonSerialize(using = DateSerializer.class)
	    private Date create_date;
	    
	    @Column(name = "update_time", columnDefinition = "datetime COMMENT '更新时间'")
	    private Date updateTime;
	    
}
